export const filterTypeKey = 'filterType';
export const periedKey = 'period_name_full';
export const monthKey = 'begin_month';
export const initialValues = {[filterTypeKey]: monthKey};
export const COMMON_KEY = periedKey;

const filterTypeConfig = {
    type: 'select',
    key: filterTypeKey,
    label: '筛选方式',
    optionsConfig: {
        options: [
            {
                label: '期次',
                value: periedKey
            },
            {
                label: '月份',
                value: monthKey
            },
        ],
        pager: {},
        isFromsServer: false
    },
    props: {
        // mode: 'multiple'

    }
};

export const periedConfig = {
    type: 'select',
    key: periedKey,
    label: '期次',
    optionsConfig: {
        unitId: 'CentralScoring_Title_select_1',
        options: [],
        pager: {}
    },
    props: {
        // mode: 'multiple'
        showSearch: true,
        filterOption: false,
    }
};

export const monthConfig = {
    type: 'select',
    key: monthKey,
    label: '月份',
    optionsConfig: {
        unitId: 'CentralScoring_Title_select_2',
        options: [],
        pager: {}
    },
    props: {
        // mode: 'multiple'
    }
};

export const initSearchConfig = [
    filterTypeConfig,
    // periedConfig
    monthConfig
];

export const searchConfig = [
    filterTypeConfig,
    monthConfig,
    periedConfig
];

const zhuanHuaPartConfig = [
    {
        type: 'all',
        id: 'CentralScoring_ConversionRate_PartOne',
        ajax: true,
    },
    {
        type: 'xiao',
        id: 'CentralScoring_ConversionRate_PartTwo'
    },
    {
        type: 'chu',
        id: 'CentralScoring_ConversionRate_PartThree'
    },
    {
        type: 'gao',
        id: 'CentralScoring_ConversionRate_PartFour'
    },
];

const chanNengPartConfig = [
    {
        type: 'all',
        id: 'CentralScoring_PerCapitaCapacity_PartOne',
        ajax: true,
    },
    {
        type: 'xiao',
        id: 'CentralScoring_PerCapitaCapacity_PartTwo'
    },
    {
        type: 'chu',
        id: 'CentralScoring_PerCapitaCapacity_PartThree'
    },
    {
        type: 'gao',
        id: 'CentralScoring_PerCapitaCapacity_PartFour'
    },
];

export const partConfig = [
    {
        key: 'zhuanhua',
        id: 'CentralScoring_Download_PartOne_excel',
        title: '综合转化率归一评分',
        num: 'I',
        parts: zhuanHuaPartConfig
    },
    {
        key: 'channeng',
        id: 'CentralScoring_Download_PartTwo_excel',
        title: '人均产能归一评分',
        num: 'II',
        parts: chanNengPartConfig
    },
];

/* eslint-disable */
export const tableConfig = [
    {
        id: 'CentralScoring_PlateDiagnosis_PartTwo',
        title: "'小学系统班'",
    },
    {
        id: 'CentralScoring_PlateDiagnosis_PartThree',
        title: "'初中'",
    },
    {
        id: 'CentralScoring_PlateDiagnosis_PartFour',
        title: "'高中'",
    },
];

